package net.cn_su.sharpeyes.adapter;

import android.content.Context;

import net.cn_su.sharpeyes.R;
import net.cn_su.sharpeyes.baseadapter.CommonAdapter;
import net.cn_su.sharpeyes.baseadapter.ViewHolder;
import net.cn_su.sharpeyes.beans.MessageInfo;
import net.cn_su.sharpeyes.utils.DateTool;

import java.util.List;

/**
 * Created by yzy on 2016/10/13.
 */
public class MessageAdapter extends CommonAdapter<MessageInfo> {
    public MessageAdapter(Context context, List<MessageInfo> mList, int itemLayoutId) {
        super(context, mList, itemLayoutId);
    }

    @Override
    public void convert(ViewHolder holder, MessageInfo item, int positon) {

        holder.setTextViewText(R.id.textView,item.getTitle())
                .setTextViewText(R.id.textView_time, DateTool.timesToStrTime(item.getCreated_at()+"","yyyy-MM-dd"));
    }
}
